package edu.yuhf.mapper;

import org.apache.ibatis.jdbc.SQL;

import java.util.Arrays;

public class ProductDynamicSqlProvider {
    public String selectByIds(Integer[] ids){
        SQL sql=new SQL();
        sql.SELECT("*");
        sql.FROM("of_product");
        sql.WHERE("id in <foreach collection='ids' item='id' open='(' separator=',' close=')'>#{id}</foreach>");
        return "<script>"+sql.toString()+"</script>";
    }
}
